﻿<?php
defined("_VALID_ACCESS") || die('Direct access forbidden');

class SCTV_PermissionInstall extends ModuleInstall { 
    public function install() {
    	Base_AclCommon::add_permission(_M('Delivery requirement: Today')); 
		Base_AclCommon::add_permission(_M('Delivery requirement: Tomorrow'));
		
		Base_AclCommon::add_permission(_M('Waiting for Accountant Support'));
		Base_AclCommon::add_permission(_M('Waiting for Business Support'));
		Base_AclCommon::add_permission(_M('Waiting for Technical Support'));
		
		Base_AclCommon::add_permission(_M('Statistics:Acceptance:All'));
		Base_AclCommon::add_permission(_M('Statistics:Acceptance:Counselor'));
		Base_AclCommon::add_permission(_M('Statistics:Acceptance:Deployment Employee'));
		Base_AclCommon::add_permission(_M('Statistics:Acceptance:Department'));
		Base_AclCommon::add_permission(_M('Statistics:Acceptance:Area'));
		
		Base_AclCommon::add_permission(_M('Statistics:Marketing:All'));
		Base_AclCommon::add_permission(_M('Statistics:Marketing:Counselor'));
		Base_AclCommon::add_permission(_M('Statistics:Marketing:Department'));
		
		Base_AclCommon::add_permission(_M('Statistics:Status'));
		Base_AclCommon::add_permission(_M('Statistics:Todo'));
		
		Base_AclCommon::add_permission(_M('Change requirement status'));
		Base_AclCommon::add_permission(_M('Acceptance:Check'));
		Base_AclCommon::add_permission(_M('Report:Acceptance:Fee Material Deposit Subnet'));
		
 		return true;
    }
 
    public function uninstall() {
    	//Base_AclCommon::delete_permission('Delivery requirement: Today');
		//Base_AclCommon::delete_permission(_M('Delivery requirement: Tomorrow'));
		
//		Base_AclCommon::delete_permission(_M('Waiting for Accountant Support'));
	//	Base_AclCommon::delete_permission(_M('Waiting for Business Support'));
		//Base_AclCommon::delete_permission(_M('Waiting for Technical Support'));
		
		return true;
    }
 
    public function info() { 
        return array( 'Author'=>'Pham Huu Le Quoc Phuc', 'License'=>'SCTV', 'Description'=>'Permission');
    }
 
    public function simple_setup() {
        return array('package' => __('Permission'), 'version'=>'1.0');
    }
 
    public function requires($v) {
        return array(); 
    }
 
    public function version() {
        return array('1.0');
    }
}
?>